package com.cj.MyServices;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cj.Mapper.UserMapper;
import com.cj.models.UserModel;
import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import com.coxautodev.graphql.tools.GraphQLQueryResolver;
import org.springframework.stereotype.Service;


@Service
public class UserService extends ServiceImpl<UserMapper,UserModel>
        implements IUser, GraphQLQueryResolver, GraphQLMutationResolver {

    public UserModel newUser(String uname,int sex){
        UserModel userModel = new UserModel();
        userModel.setUserName(uname);
        this.save(userModel);
        return userModel;

    }

    public UserModel newUserByModel(UserModel userModel){
        this.save(userModel);
        return userModel;

    }


}
